/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_UICollectionViewDelegateFlowLayout : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(UIKit.UICollectionViewDelegateFlowLayout); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : UIKit.UICollectionViewDelegateFlowLayout, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodGetInsetForSection0;
        bool isCallingGetInsetForSection0= false;
        
            public override UIKit.UIEdgeInsets GetInsetForSection(UIKit.UICollectionView p0, UIKit.UICollectionViewLayout p1, System.nint p2) 
            { 
                if (methodGetInsetForSection0 == null && instance!=null )
                {
                    methodGetInsetForSection0 = instance.Type.GetMethod("GetInsetForSection", 3);
                }
                if (methodGetInsetForSection0 != null && !isCallingGetInsetForSection0)
                {
                    isCallingGetInsetForSection0 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodGetInsetForSection0, instance, param );
                        
                        
                        isCallingGetInsetForSection0 = false;

                        
                        return (UIKit.UIEdgeInsets)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetInsetForSection *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(UIKit.UIEdgeInsets);
                        
                    

                }
            }
        
        
        
        IMethod methodGetMinimumInteritemSpacingForSection1;
        bool isCallingGetMinimumInteritemSpacingForSection1= false;
        
            public override System.nfloat GetMinimumInteritemSpacingForSection(UIKit.UICollectionView p0, UIKit.UICollectionViewLayout p1, System.nint p2) 
            { 
                if (methodGetMinimumInteritemSpacingForSection1 == null && instance!=null )
                {
                    methodGetMinimumInteritemSpacingForSection1 = instance.Type.GetMethod("GetMinimumInteritemSpacingForSection", 3);
                }
                if (methodGetMinimumInteritemSpacingForSection1 != null && !isCallingGetMinimumInteritemSpacingForSection1)
                {
                    isCallingGetMinimumInteritemSpacingForSection1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodGetMinimumInteritemSpacingForSection1, instance, param );
                        
                        
                        isCallingGetMinimumInteritemSpacingForSection1 = false;

                        
                        return (System.nfloat)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetMinimumInteritemSpacingForSection *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.nfloat);
                        
                    

                }
            }
        
        
        
        IMethod methodGetMinimumLineSpacingForSection2;
        bool isCallingGetMinimumLineSpacingForSection2= false;
        
            public override System.nfloat GetMinimumLineSpacingForSection(UIKit.UICollectionView p0, UIKit.UICollectionViewLayout p1, System.nint p2) 
            { 
                if (methodGetMinimumLineSpacingForSection2 == null && instance!=null )
                {
                    methodGetMinimumLineSpacingForSection2 = instance.Type.GetMethod("GetMinimumLineSpacingForSection", 3);
                }
                if (methodGetMinimumLineSpacingForSection2 != null && !isCallingGetMinimumLineSpacingForSection2)
                {
                    isCallingGetMinimumLineSpacingForSection2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodGetMinimumLineSpacingForSection2, instance, param );
                        
                        
                        isCallingGetMinimumLineSpacingForSection2 = false;

                        
                        return (System.nfloat)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetMinimumLineSpacingForSection *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.nfloat);
                        
                    

                }
            }
        
        
        
        IMethod methodGetReferenceSizeForFooter3;
        bool isCallingGetReferenceSizeForFooter3= false;
        
            public override CoreGraphics.CGSize GetReferenceSizeForFooter(UIKit.UICollectionView p0, UIKit.UICollectionViewLayout p1, System.nint p2) 
            { 
                if (methodGetReferenceSizeForFooter3 == null && instance!=null )
                {
                    methodGetReferenceSizeForFooter3 = instance.Type.GetMethod("GetReferenceSizeForFooter", 3);
                }
                if (methodGetReferenceSizeForFooter3 != null && !isCallingGetReferenceSizeForFooter3)
                {
                    isCallingGetReferenceSizeForFooter3 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodGetReferenceSizeForFooter3, instance, param );
                        
                        
                        isCallingGetReferenceSizeForFooter3 = false;

                        
                        return (CoreGraphics.CGSize)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetReferenceSizeForFooter *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(CoreGraphics.CGSize);
                        
                    

                }
            }
        
        
        
        IMethod methodGetReferenceSizeForHeader4;
        bool isCallingGetReferenceSizeForHeader4= false;
        
            public override CoreGraphics.CGSize GetReferenceSizeForHeader(UIKit.UICollectionView p0, UIKit.UICollectionViewLayout p1, System.nint p2) 
            { 
                if (methodGetReferenceSizeForHeader4 == null && instance!=null )
                {
                    methodGetReferenceSizeForHeader4 = instance.Type.GetMethod("GetReferenceSizeForHeader", 3);
                }
                if (methodGetReferenceSizeForHeader4 != null && !isCallingGetReferenceSizeForHeader4)
                {
                    isCallingGetReferenceSizeForHeader4 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodGetReferenceSizeForHeader4, instance, param );
                        
                        
                        isCallingGetReferenceSizeForHeader4 = false;

                        
                        return (CoreGraphics.CGSize)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetReferenceSizeForHeader *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(CoreGraphics.CGSize);
                        
                    

                }
            }
        
        
        
        IMethod methodGetSizeForItem5;
        bool isCallingGetSizeForItem5= false;
        
            public override CoreGraphics.CGSize GetSizeForItem(UIKit.UICollectionView p0, UIKit.UICollectionViewLayout p1, Foundation.NSIndexPath p2) 
            { 
                if (methodGetSizeForItem5 == null && instance!=null )
                {
                    methodGetSizeForItem5 = instance.Type.GetMethod("GetSizeForItem", 3);
                }
                if (methodGetSizeForItem5 != null && !isCallingGetSizeForItem5)
                {
                    isCallingGetSizeForItem5 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodGetSizeForItem5, instance, param );
                        
                        
                        isCallingGetSizeForItem5 = false;

                        
                        return (CoreGraphics.CGSize)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetSizeForItem *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(CoreGraphics.CGSize);
                        
                    

                }
            }
        
        
        
        IMethod methodGetIndexPathForPreferredFocusedView6;
        bool isCallingGetIndexPathForPreferredFocusedView6= false;
        
            public override Foundation.NSIndexPath GetIndexPathForPreferredFocusedView(UIKit.UICollectionView p0) 
            { 
                if (methodGetIndexPathForPreferredFocusedView6 == null && instance!=null )
                {
                    methodGetIndexPathForPreferredFocusedView6 = instance.Type.GetMethod("GetIndexPathForPreferredFocusedView", 1);
                }
                if (methodGetIndexPathForPreferredFocusedView6 != null && !isCallingGetIndexPathForPreferredFocusedView6)
                {
                    isCallingGetIndexPathForPreferredFocusedView6 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodGetIndexPathForPreferredFocusedView6, instance, param );
                        
                        
                        isCallingGetIndexPathForPreferredFocusedView6 = false;

                        
                        return (Foundation.NSIndexPath)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetIndexPathForPreferredFocusedView *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(Foundation.NSIndexPath);
                        
                    

                }
            }
        
        
        
        IMethod methodGetTargetIndexPathForMove7;
        bool isCallingGetTargetIndexPathForMove7= false;
        
            public override Foundation.NSIndexPath GetTargetIndexPathForMove(UIKit.UICollectionView p0, Foundation.NSIndexPath p1, Foundation.NSIndexPath p2) 
            { 
                if (methodGetTargetIndexPathForMove7 == null && instance!=null )
                {
                    methodGetTargetIndexPathForMove7 = instance.Type.GetMethod("GetTargetIndexPathForMove", 3);
                }
                if (methodGetTargetIndexPathForMove7 != null && !isCallingGetTargetIndexPathForMove7)
                {
                    isCallingGetTargetIndexPathForMove7 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodGetTargetIndexPathForMove7, instance, param );
                        
                        
                        isCallingGetTargetIndexPathForMove7 = false;

                        
                        return (Foundation.NSIndexPath)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetTargetIndexPathForMove *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(Foundation.NSIndexPath);
                        
                    

                }
            }
        
        
        
        IMethod methodGetMethodForSelector8;
        bool isCallingGetMethodForSelector8= false;
        
            public override System.IntPtr GetMethodForSelector(ObjCRuntime.Selector p0) 
            { 
                if (methodGetMethodForSelector8 == null && instance!=null )
                {
                    methodGetMethodForSelector8 = instance.Type.GetMethod("GetMethodForSelector", 1);
                }
                if (methodGetMethodForSelector8 != null && !isCallingGetMethodForSelector8)
                {
                    isCallingGetMethodForSelector8 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodGetMethodForSelector8, instance, param );
                        
                        
                        isCallingGetMethodForSelector8 = false;

                        
                        return (System.IntPtr)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetMethodForSelector *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.IntPtr);
                        
                    

                }
            }
        
        
    }
}